package com.ruoyi.ManagerApi.controller;

import com.ruoyi.ManagerApi.service.HomeService;
import com.ruoyi.ManagerApi.service.ITTpApiService;
import com.ruoyi.ManagerApi.vo.GetDataVo;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/getHome")
@Tag(name = "驾驶舱首页数据", description = "驾驶舱首页数据相关操作API")
public class HomeController {
    @Autowired
    private HomeService homeService;
    /**
     * 获取首页左边顶部监控设备统计数据
     */
    @Operation(summary = "获取首页左边顶部监控设备统计数据", description = "获取首页左边顶部监控设备统计数据")
    @PostMapping(value = "/getStatics")
    public String getStatics(@RequestBody GetDataVo getDataVo)
    {
        return homeService.selectHomeLeftTop(getDataVo);
    }

    /**
     * 获取首页左边顶部消防设备统计数据
     */
    @Operation(summary = "获取首页左边顶部消防设备统计数据", description = "获取首页左边顶部消防设备统计数据")
    @PostMapping(value = "/getFireStatics")
    public String getFireStatics(@RequestBody GetDataVo getDataVo)
    {
        return homeService.selectHomeLeftFireTop(getDataVo);
    }

    /**
     * 获取首页监控列表数据
     */
    @Operation(summary = "获取首页监控列表数据", description = "获取首页监控列表数据")
    @PostMapping(value = "/getMonitor")
    public String getMonitor(@RequestBody GetDataVo getDataVo)
    {
        return homeService.selectHomeLeftMonitorTop(getDataVo);
    }

    /**
     * 查看监控播放
     */
    @Operation(summary = "查看监控播放", description = "查看监控播放")
    @PostMapping(value = "/getPlay")
    public String getPlay(@RequestBody GetDataVo getDataVo)
    {
        return homeService.selectHomeLeftMonitorPlayTop(getDataVo);
    }

}
